<?php // FAQ ?>
<?php
	$sql = "select a.moduleheading 
			from ms_module a 
			where 	a.stsrc = 'A' 
				and a.modulename = '".$doc_name."' 
				and a.moduleid = '".$doc_id."' 
				and a.modulestatus = 1 
			limit 0,1
			";
	$exe = mysql_query($sql) or die(mysql_error());
	$num = mysql_num_rows($exe);
	$row = mysql_fetch_array($exe);
?>
<div>
	<h2><?php if($num > 0){ echo $row['moduleheading']; } ?></h2>
</div>
<div>
<?php // Get Sub Title(Label), All Text, View All Text
	$sql = "select a.*, c.filename 
			from tbl_text a 
				left join ms_module b 
					on a.moduleid = b.moduleid and b.stsrc = 'A' 
				left join ms_file c
					on a.texturlimage = c.fileid and c.stsrc = 'A' and c.filerole = 'image' 
			where 	a.stsrc = 'A' 
				and b.modulename = '".$doc_name."' 
				and b.moduleid = '".$doc_id."' 
				and a.textstatus = 1 
			order by a.textposition asc, a.datein desc
			
			";
	$exe = mysql_query($sql) or die(mysql_error());
	$num = mysql_num_rows($exe);
	
	
	if($num > 0)
	{
		while($row = mysql_fetch_array($exe))
		{
?>

	<h4><?php echo stripslashes(html_entity_decode($row['textlabel'])); ?></h4>
	<p>
		<?php
			if($row['texturlimagestatus'] == 1)
			{
		?>
		<img src="<?php echo getURLdomain()."/upload/".$row['filename']; ?>" style="float:right; max-width:300px; max-height:300px; padding:0 0 10px 5px;" />
		<?php
			}
		?>
		<?php echo stripslashes(html_entity_decode($row['textheader'])); ?>
		<?php echo stripslashes(html_entity_decode($row['textcontent'])); ?>
		<div class="clear"></div>
	</p>
	
<?php
		}
	}
?>
</div>